package com.yuandian.management.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuandian.api.management.entity.ConfComponentIp;
import com.yuandian.bpm.common.data.datascope.BpmBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 组件IP配置表-Mapper接口
 * @author zfsn
 * @date 2023-3-16
 */
@Mapper
public interface ConfComponentIpMapper extends BpmBaseMapper<ConfComponentIp> {
    List<ConfComponentIp> selectByIsFilter(@Param("isFilter") int isFilter);

	void batchUpdateSyncState(@Param("list") List<Integer> managementIdList, @Param("syncState") int syncState);

	void resetIpFilter();

	/**
	 * 查询探针ip过滤分页信息
	 *
	 * @param confComponentIp
	 * @return 通用返回对象
	 */
	Page<ConfComponentIp> queryInfoFilterIp(Page<ConfComponentIp> page, @Param("params") ConfComponentIp confComponentIp);

	/**
	 * 探针采集ip过滤管理--停止/新增过滤
	 * @return
	 */
	int updateIpFilter(@Param("params") ConfComponentIp confComponentIp);

	/**
	 * 探针采集ip过滤管理--停止/新增过滤和同步状态
	 * @return
	 */
	int updateIpFilterAndSynchStatus(@Param("params")ConfComponentIp confComponentIp);

	/**
	 * 分页查询
	 *
	 * @param confComponentIp 筛选条件
	 * @return 通用返回对象
	 */
    Page<ConfComponentIp> listPage(Page<ConfComponentIp> page, @Param("params") ConfComponentIp confComponentIp);
}
